Documentation for 'State-Level Economic Policy Uncertainty'
by Scott R. Baker, Steven Davis, and Jeffrey Levy

This version: 8/23/2022

All files from replication package should be put into the same directory. All code can be run from that directory.

Code is executed in three languages: Stata, Python, and Matlab. State EPU values are generated by the authors using data from Access World News.

Code and output are as follows:
0. Generate State Month NPI Data.do - This file builds state-month level data on government-mandated restrictions on commercial and social activities from two major sources, outputting the final LSI values that are used in Tables 3 and 4 and Figure A.5.
1. Figures 3, A4, A11; Tables 1-3 - This file generates figures and tables regarding how EPU varies around elections (Figure 3), the ratio between state and national EPU (Figure A4), correlations with COVID mitigation policies (Figure A11), and all regression tables dealing with correlations of EPU with elections and COVID-related variables.
2. Figures 2, A1, A2, and Correlations - This file produces Figure 2 which displays the path of State and National EPU over time. It also produces values for the correlations of EPU across states for various time horizons, as reported in Section 2.5. Finally, it produces Figures A1 and A2 relating to correlations of EPU across states.
3. Figure 4, A3.do - This file generates Figures 4 and A3 which detail 'event studies' for a range of different national and state specific shocks.
4. Figure 1.py - This file generates Figure 1, which displays the path of State, National and combined EPU values by quarter.

5. Data for Figures 8, A2, A3.do - This code generates the data for our VAR results.
6. Figures 5, A6, A7, A9.py - This code generates our IRFs for our panel VAR results (Figures 5, A6, A7, and A9)
7. Figures 6 and A8.m - This code generates the IRF and historical decomposition results for California (Figures 6 and A8)
8. Figure A5.py - This code generates the VAR IRFs for each state across a range of filtering types (Figure A5)
9. Figure 7.py - Generates the Border EPU IRFs (Figure 7)